package org.p2psimulator.entity.protocol.messages.chord;

import org.p2psimulator.entity.Id;
import org.p2psimulator.entity.Message;
import org.p2psimulator.entity.behavior.BehaviorTypes;
import org.p2psimulator.entity.protocol.messages.MessageTypes;

public class MyPredecessor extends Message {

	private Id predecessor;

	public Id getPredecessor() {
		return predecessor;
	}

	public void setPredecessor(Id predecessor) {
		this.predecessor = predecessor;
	}

	public MyPredecessor(Id origin, Id destination, int transactionId,
			BehaviorTypes originBehavior) {
		super(origin, destination, transactionId, originBehavior);
	}

	@Override
	public MessageTypes getMessageType() {

		return MessageTypes.CHORD_MYPREDECESSOR;
	}

	@Override
	public String getName() {
		return MessageTypes.CHORD_MYPREDECESSOR.getName();
	}

}
